package com.web.dao.impl;

import com.web.dao.StudentDAO;
import com.web.entity.User;
import com.web.test.Student;
import com.web.util.JDBCUtils;

import java.util.List;

/**
 * @author lenovo
 * @Description
 * @Date2025-2-28 16:52
 */
public class StudentDAOImpl implements StudentDAO {
    @Override
    public List<Student> selectAllStudents() {

        return JDBCUtils.query(Student.class,"select * from student_s");
    }
    @Override
    public List<Student> selectStudentPage(int start,int len){
        return JDBCUtils.query(Student.class,"select * from student_s limit ?,?",start,len);
    }

    @Override
    public int selectStudentCount(){
        return JDBCUtils.queryCount("select count(*) from student_s");
    }

}